package inspectedpersonnel;

import java.util.HashSet;

public class InspectedPersonDemo {
    public static void main(String[] args) {
        HashSet<InspectedPerson> hs = new HashSet<InspectedPerson>();
        InspectedPerson p1 = new InspectedPerson("hanser", 30, "henan", "male");
        InspectedPerson p2 = new InspectedPerson("cc", 50, "henan", "female");
        InspectedPerson p3 = new InspectedPerson("nn", 20, "suzhou", "female");
        hs.add(p1);
        hs.add(p2);
        hs.add(p3);
        for (InspectedPerson p : hs) {
            System.out.println(p.getName() + "   " + p.getAge() + " " + p.getAddress() + " " + p.getSex());
        }
        p1.haveinspected();
        p2.uninspected();
        p3.uninspected();
    }
}
